package com.charmzenus.message.base;

import org.springframework.web.bind.annotation.*;

@ControllerAdvice
@RestController
public class AppControllerActive {


    @ResponseBody
    @ExceptionHandler(value = Exception.class)
    public BaseResponseInfo<String> errorHandler(Exception s) {
        return new BaseResponseInfo<>(-1, "服务器异常");

    }

    @RequestMapping(name = "/error")
    public BaseResponseInfo<String> error404() {
        return new BaseResponseInfo<>(-1, "该接口不存在");
    }
}
